var fn1 = function () {
  this.foo = function () {
    console.log(111)
  }
}
const f1 = new fn1()


var fn2 = function () {}
fn2.prototype.foo = function () {
  console.log(222)
}
const f2 = new fn2()